BCS The Weakest Precondition
نویسندگان
چکیده
An extension of Dijkstra's guarded command language is studied, including unbounded demonic choice and a backtrack operator. We consider three orderings on this language: a reenement ordering deened by Back, a new deadlock ordering, and an approximation ordering of Nelson. The deadlock ordering is in between the two other orderings. All operators are monotonic in the Nelson ordering, but backtracking is not monotonic in the Back ordering and sequential composition is not monotonic for the deadlock ordering. At rst sight recursion can only be added using the Nelson ordering. We show that, under certain circumstances , least xed points for non-monotonic functions can be obtained by iteration from the least element. This permits the addition of recursion even using the Back ordering or the deadlock ordering in a fully compositional way. In order to give a semantic characterization of the three orderings in terms of semantics that relate initial states to possible outcomes of the computation, the relation between predicate transformers and discrete power domains is studied. We consider (two versions of) the Smyth power domain and the Egli-Milner power domain.
منابع مشابه
Comparing Weakest Precondition and Weakest Liberal Precondition
In this article we investigate the relationships between the classical notions of weakest precondition and weakest liberal precondition, and provide several results, namely that in general, weakest liberal precondition is neither stronger nor weaker than weakest precondition, however, given a deterministic and terminating sequential while program and a postcondition, they are equivalent. Hence,...
متن کاملCommutativity of quantum weakest preconditions
The notion of quantum weakest precondition was introduced by D’Hondt and P. Panangaden (Mathematical Structures in Computer Science 16(2006)429-451), and they presented a representation of weakest precondition of a quantum program in the operatorsum form. In this letter, we give an intrinsic characterization of the weakest precondition of a quantum program given in a systemenvironment model. Fu...
متن کاملProgramming Research Group a Weakest Precondition Semantics for Z (extended Version) a Weakest Precondition Semantics for Z (extended Version)
The lack of a method for developing programs from Z speciications is a diiculty widely recognised. In response to this problem, diierent approaches to the integration of Z with a reenement calculus have been proposed. These programming techniques are promising, but, as far as we know, have not been formalised. Since they are based on reenement calculi formalised in terms of weakest precondition...
متن کاملWeakest Preconditions for High-Level Programs (Long Version)
In proof theory, a standard method for showing the correctness of a program w.r.t. given preand postconditions is to construct a weakest precondition and to show that the precondition implies the weakest precondition. In this paper, graph programs in the sense of Habel and Plump 2001 are extended to programs over high-level rules with application conditions, a formal definition of weakest preco...
متن کاملWeakest Preconditions for High-Level Programs
In proof theory, a standard method for showing the correctness of a program w.r.t. given preand postconditions is to construct a weakest precondition and to show that the precondition implies the weakest precondition. In this paper, graph programs in the sense of Habel and Plump 2001 are extended to programs over high-level rules with application conditions, a formal definition of weakest preco...
متن کاملUsing Weakest Preconditions to Simplify Integrity Constraint Checking
We present a procedure for deriving the weakest precondition for a database update and an integrity constraint. We show how to simplify the weakest precondition to produce a condition to be evaluated before the update is performed. This provides an efficient means to ensure that database updates maintain integrity constraints.
متن کامل